home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2004 June
/
PCWorld_2004-06_cd.bin
/
software
/
vyzkuste
/
koolmoves
/
kmsetup.exe
/
{app}
/
Motion Scripts
/
Sweeping Highlight
/
effect2.txt
Wrap
Text File
|
2004-03-20
|
1KB
|
52 lines
// main_init function
main_init = function(mc){
glowbar = function(mc,tl_x, tl_y, br_x, br_y, cf ){
mc.lineStyle();
var colors = [cf,cf,cf];
var alphas = [0,glowbaralpha,0];
var ratios = [0x10,0x80,0xf0];
var matrix = {matrixtype:'box',w:br_x-tl_x,h:br_y-tl_y,x:tl_x-0,y:tl_y-0,r:0};
mc.begingradientfill('linear',colors,alphas,ratios,matrix);
mc.moveTo (tl_x,tl_y);
mc.lineTo (br_x,tl_y);
mc.lineTo (br_x,br_y);
mc.lineTo (tl_x,br_y);
mc.endFill();
}
subs_done = true;
b = mc.getBounds(mc);
mch = 2*Math.max(b.yMax,-b.yMin)-$padding;
mcw = 2*Math.max(b.xMax,-b.xMin)-$padding;
if (!showoriginal) mc._alpha = 0;
createEmptyMovieClip('bar',6);
mc.duplicateMovieClip('barmask',7);
bar.setMask(barmask);
hbh = Math.ceil((mch / Math.sin(deg45) + barwidth * Math.tan(deg45))/2);
hbw = Math.ceil(barwidth / 2);
glowbar(bar,-hbw,-hbh,hbw,hbh,glowbarcolor);
bar._rotation = barrotation;
edge = Math.ceil((mcw + bar._width)/2);
bar._x = righttoleft ? edge : -edge;
cycle = 0;
}
// main_effect function
main_effect = function(mc,frame){
bar._x += (righttoleft ? -cyclespeed : cyclespeed);
if (bar._x < -edge) { bar._x = edge; cycle++; }
if (bar._x > edge) { bar._x = -edge; cycle++; }
if (cycle == cycles) { end_effect = true; barmask.removeMovieClip(); bar.removeMovieClip(); }
}
// sub_init function
sub_init = function(mc){
}
// sub_effect function
sub_effect = function(mc,frame){
}